﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.master" AutoEventWireup="true"
    CodeFile="List.aspx.cs" Inherits="List" %>

<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="C" runat="Server">
    <div class="part5">
        <div class="left">
            <div class="fenlei">
                <h3>
                    <asp:Label ID="Label7" runat="server" Text=""></asp:Label>
                   </h3>
                <ul style="display">
                    <asp:Repeater ID="rptleftmenusub" runat="server" DataSourceID="odssubmenu">
                        <ItemTemplate>
                            <li><a href='<%# Eval("ListUrl") %>?id=<%# Eval("ID") %>'>
                                <%# DataBinder.Eval(Container.DataItem,"Name") %></a> </li>
                        </ItemTemplate>
                    </asp:Repeater>
                    <asp:ObjectDataSource ID="odssubmenu" runat="server" DataObjectTypeName="NewsPub.Classis"
                        OldValuesParameterFormatString="original_{0}" SelectMethod="ListMenu"
                        TypeName="NewsPub.Classis">
                        <SelectParameters>
                            <asp:QueryStringParameter QueryStringField="id"  Name="parentKey" DefaultValue="0" />
                        </SelectParameters>
                    </asp:ObjectDataSource>
                </ul>
            </div>
        </div>
        <!--left end-->
        <div class="right">
            <div id="lmlist">
                <%--        <h2><em>当前位置：<a href="./../">首页</a>&nbsp;&gt;&nbsp;<a href="./">政务公开</a> </em>
</h2>--%>
                <h2>
                    <em>当前位置：<a href="./../../">首页</a>&nbsp;&gt;&nbsp;<asp:Label ID="Label8" runat="server" Text="Label"></asp:Label>
                    <%--<%=getlocation() %>--%><%--<a href="./../../">首页</a>&nbsp;&gt;&nbsp;<a href="./../">政务公开</a>&nbsp;&gt;&nbsp;<a href="./">领导分工</a>--%>
                    </em>
                </h2>
                <ul>
             <%-- <asp:GridView ID="gv" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="ods" AllowPaging="True" AllowSorting="True" CssClass="msgtable" PageSize="3" CellPadding="0" GridLines="None" EnableModelValidation="True">
        <Columns>
            
            <asp:BoundField DataField="ID" HeaderText="编号" SortExpression="ID" InsertVisible="False" ReadOnly="True" >
			    <HeaderStyle Width="40px" HorizontalAlign="Center"/>
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" CssClass="key" />
            </asp:BoundField>
            
			<asp:BoundField DataField="ClassisName" HeaderText="文章分类" SortExpression="ClassisID">
			<ItemStyle VerticalAlign="Middle" HorizontalAlign="Center" />
			<HeaderStyle HorizontalAlign="Center" />
			</asp:BoundField>
            <<asp:BoundField DataField="ClassisID" HeaderText="文章分类" SortExpression="ClassisID" />	
            <asp:BoundField DataField="Title" HeaderText="标题" SortExpression="Title" DataFormatString="{0:n0}">
                <ItemStyle HorizontalAlign="Right" Font-Bold="True" />
				 <HeaderStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField DataField="UserName" HeaderText="作者" SortExpression="UserID" DataFormatString="{0:n0}">
                <ItemStyle HorizontalAlign="Right" Font-Bold="True" />
				 <HeaderStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField DataField="CreateTime" HeaderText="发表时间" SortExpression="CreateTime" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" >
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="120px" />
				<HeaderStyle HorizontalAlign="Center" />
            </asp:BoundField>
        </Columns>
        <EmptyDataTemplate>
            没有符合条件的数据！
        </EmptyDataTemplate>
    </asp:GridView> --%>
                    <asp:Repeater ID="rptlist" runat="server" DataSourceID="ods">
                        <ItemTemplate>
                            <li><a href='<%# Eval("ViewUrl") %>?id=<%# DataBinder.Eval(Container.DataItem,"ID") %>'>
                                <script type="text/javascript">
                                    document.write(getTitle('<%# Eval("Title") %>', 80));
                                </script></a> <i>
                                    <%# String.Format("{0:d}", DateTime.Parse(DataBinder.Eval(Container.DataItem, "CreateTime").ToString()))%></i>
                            </li>
                        </ItemTemplate>
                    </asp:Repeater>
                    <%----%>
    <asp:ObjectDataSource ID="ods" runat="server" EnablePaging="True" SelectCountMethod="SearchListCount" SelectMethod="SearchList" SortParameterName="orderClause" EnableViewState="false"
        TypeName="NewsPub.Details" DataObjectTypeName="NewsPub.Details" >
        <SelectParameters>
            <asp:QueryStringParameter QueryStringField="id"  Name="key" DefaultValue="0" />
            <%--<asp:ControlParameter ControlID="txtKey" Name="key" PropertyName="Text" Type="String" />--%>
            <asp:Parameter Name="orderClause" Type="String" />
            <asp:Parameter Name="startRowIndex" Type="Int32" />
            <asp:Parameter Name="maximumRows" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    
                    <div class="c">
                    </div>
                </ul>
                <div class="page">
                    <%--<XCL:DataPager ID="DataPager1" runat="server" PageSize="2"  DataSourceID="ods" >
                    </XCL:DataPager>--%>
                    <XCL:DataPager ID="pager" runat="server"  DataSourceID="ods" PageSize="20"
         PageIndex2="1" OnPageIndexChanged="pager_PageIndexChanged" >
        <PagerSettings Mode="NumericFirstLast" />
        <PagerTemplate>
            <li>共<asp:Label ID="Label6" runat="server" Text='<%# Eval("TotalRowCount") %>'></asp:Label>条
            每页<asp:Label ID="Label3" runat="server" Text='<%# Eval("PageSize") %>'></asp:Label>条
            当前第
            <asp:Label ID="LabelCurrentPage" runat="server" Text='<%# Eval("PageIndex2") %>'></asp:Label>
            页/共
            <asp:Label ID="LabelPageCount" runat="server" Text='<%# Eval("PageCount") %>'></asp:Label>
            页
            <asp:LinkButton ID="LinkButtonFirstPage" runat="server" CommandArgument="First" CommandName="Page"
                Visible='<%# !(Boolean)Eval("IsFirstPage") %>'>首页</asp:LinkButton>
            <asp:LinkButton ID="LinkButtonPreviousPage" runat="server" CommandArgument="Prev"
                CommandName="Page" Visible='<%# !(Boolean)Eval("IsFirstPage") %>'>上一页</asp:LinkButton>
            <asp:LinkButton ID="LinkButtonNextPage" runat="server" CommandArgument="Next" CommandName="Page"
                Visible='<%# !(Boolean)Eval("IsLastPage") %>'>下一页</asp:LinkButton>
            <asp:LinkButton ID="LinkButtonLastPage" runat="server" CommandArgument="Last" CommandName="Page"
                Visible='<%# !(Boolean)Eval("IsLastPage") %>'>尾页</asp:LinkButton>
            转到第
            <input type="textbox" id="txtNewPageIndex" style="width: 40px;" value='<%# Eval("PageIndex2") %>' />页
            <input type="button" id="btnGo" value="GO" onclick="javascript:__doPostBack('<%# ((XControl.DataPager)Container.NamingContainer).UniqueID %>    ','Page$'+document.getElementById('txtNewPageIndex').value)" />
</li>
        </PagerTemplate>
    </XCL:DataPager>
                    <%--<script language="JavaScript">





    createPageHTML(1, 0, "index", "html", "${RECORD_COUNT}");

</script><a href="#none" onclick="return false;">共 1 页 0 条</a>--%>
                </div>
                <!-- 分页 -->
            </div>
            <!--栏目名称-->
        </div>
        <!--right end-->
    </div>
</asp:Content>
